<header class="layout head padding-small">
    <a href="javascript:back(true);" class="hBack float-left"></a>
    <h4 class="hTxt float-left text-center text-white">交易评价</h4>
    <a href="javascript:;" id="btnJdkey" class="hHlep float-right"></a>
</header>
<form action="" method="post" id="evaluate_form">
    <div class="bg-white  margin padding radius-big text-center">订单编号：<?php echo $output['order_info']['order_sn']?></div>
    <!--商品列表S-->
    <?php if(!empty($output['order_goods'])){?>
    <?php foreach($output['order_goods'] as $goods){?>
    <div class="bg-white  margin padding radius-big assess-goods">
        <div class="padding-bottom">
            <a url="index.php?act=goods&goods_id=<?php echo $goods['goods_id']; ?>" class="clearfix app_onclick">
                <span class="goods-img float-left"><img src="<?php echo thumb($goods,'small'); ?>" onload="javascript:DrawImage(this,60,60);" alt="暂无图片" class="good-img"></span>
                <span class="goods-name margin-bottom text-small margin-small-left"><?php echo $goods['goods_name'];?></span>
                <span class="text-red"><i class="goods-price">&yen;<?php echo $goods['goods_price'];?></i> &times; <i class="salesNum"><?php echo $goods['goods_num']?></i></span>
            </a>
        </div>
        <div class="assess-star">产品质量：
            <i class="text-yellow ass-star icon-star"></i>
            <i class="text-yellow ass-star icon-star"></i>
            <i class="text-yellow ass-star icon-star"></i>
            <i class="text-yellow ass-star icon-star"></i>
            <i class="text-yellow ass-star icon-star"></i>
            （<span class="gtip">非常满意</span>）
            <input type="hidden" name="goods[<?php echo $goods['rec_id'];?>][points]" value="1">
        </div>
        <div class="padding-top">
            <textarea rows="3" name="goods[<?php echo $goods['rec_id'];?>][comment]" class="border-ef7f7e radius-big layout " placeholder="请写出您对商品的使用感觉吧。"></textarea>
        </div>
    </div>
        <?php }?>
    <?php }?>
    <!--商品评价E-->
    <!--商城评价E-->
    <div class="bg-white  margin padding radius-big assess-seller">
        <a url="index.php?act=show_store&id=<?php echo $output['store_info']['store_id'];?>" class="sale-off clearfix app_onclick">
            <i class="float-left margin-left"><img src="<?php if(empty($output['store_info']['store_logo'])){echo ATTACH_COMMON.DS.$GLOBALS['setting_config']['default_store_logo'];}else{echo ATTACH_STORE.'/'.$output['store_info']['store_logo'];}?>" onload="javascript:DrawImage(this,60,60);" alt="<?php echo $output['store_info']['store_name']; ?>"></i>
            <span class="margin-left"><?php echo $output['store_info']['store_name'];?></span>
        </a>
        <div  class="assess-star">卖家的产品品质：
            <i class="text-yellow ass-star icon-star"></i>
            <i class="text-yellow ass-star icon-star"></i>
            <i class="text-yellow ass-star icon-star"></i>
            <i class="text-yellow ass-star icon-star"></i>
            <i class="text-yellow ass-star icon-star"></i>
            <input name="store[goodsquality]" type="hidden"  value="5">（<span class="stip">很好</span>）
        </div>
        <div  class="assess-star">产品的包装品质：
            <i class="text-yellow ass-star icon-star"></i>
            <i class="text-yellow ass-star icon-star"></i>
            <i class="text-yellow ass-star icon-star"></i>
            <i class="text-yellow ass-star icon-star"></i>
            <i class="text-yellow ass-star icon-star"></i>
            <input  type="hidden" value="5" name="store[packagequality]">（<span class="stip">很好</span>）
        </div>
        <div  class="assess-star">卖家的发货速度：
            <i class="text-yellow ass-star icon-star"></i>
            <i class="text-yellow ass-star icon-star"></i>
            <i class="text-yellow ass-star icon-star"></i>
            <i class="text-yellow ass-star icon-star"></i>
            <i class="text-yellow ass-star icon-star"></i>
            <input  type="hidden" value="5" name="store[shippingspeed]">（<span class="stip">很好</span>）
        </div>
        <div  class="assess-star">卖家的售后服务：
            <i class="text-yellow ass-star icon-star"></i>
            <i class="text-yellow ass-star icon-star"></i>
            <i class="text-yellow ass-star icon-star"></i>
            <i class="text-yellow ass-star icon-star"></i>
            <i class="text-yellow ass-star icon-star"></i>
            <input  type="hidden" value="5" name="store[aftersale]">（<span class="stip">很好</span>）
        </div>
    </div>
    <div class=" margin "><span  class="radius-big layout text-big border-none bg-red text-white padding height text-center" onclick="add_evaluate()">确定评价</span></div>
    <!--商城评价E-->
</form>
<script>
    //评论页面星星
    $('.ass-star').click(function(){
        var starIndex = $(this).index(),
             $atarP = $(this).parent('.assess-star'),
            $eval_value = $atarP.find('input:hidden[name=^goods]'),
            $eval_tip = $atarP.find('span.gtip'),
            $eval_store_value = $atarP.find('input:hidden[name^=store]'),
            $eval_store_tip = $atarP.find('span.stip');
        $(this).removeClass('icon-star-o');
        if(starIndex==4){
            $eval_value.val('1');
            $eval_tip.text('非常满意');
            $eval_store_value.val(5);
            $eval_store_tip.text('很好');
        }else if(starIndex==3){
            $eval_value.val('2');
            $eval_tip.text('满意');
            $eval_store_value.val(4);
            $eval_store_tip.text('好');
        }else{
            $eval_value.val('3');
            $eval_tip.text('一般');
            $eval_store_value.val(3);
            $eval_store_tip.text('一般');
        }

        $atarP.find('.ass-star:gt('+starIndex+')').addClass('icon-star-o');
        $atarP.find('.ass-star:lt('+starIndex+')').removeClass('icon-star-o');
    })
    function add_evaluate(){
        $.post('index.php?act=member_evaluate&op=add&p=app&order_id=<?php echo $_GET['order_id']?>',$('#evaluate_form').serialize(),function(data){
            Jump(data);
        },'json');
    }
</script>